package com.me.study.javaCore.classLoader.classLoadingSeq1;

/**
 * 静态内部类的初始化时机
 *
 * @author ME
 * @date   2019/2/28 18:39
 */
public class TestStaticInner {

    private static class SingletonHolder {
        private static final TestStaticInner INSTANCE = new TestStaticInner();
    }

    private TestStaticInner(){
        System.out.println("单例模式被初始化了！");
    }

    public static final TestStaticInner getInstance() {
        return SingletonHolder.INSTANCE;
    }

    public static void sayHello() {
        System.out.println("hello!!!");
    }
}
